Skip to content

feat(runtime): add agent_type + agent_framework fields to UiPathRuntimeFactorySettings#141

Merged
viswa-uipath merged 2 commits into
mainfrom
feat/frameworks
Jul 2, 2026
Merged

feat(runtime): add agent_type + agent_framework fields to UiPathRuntimeFactorySettings#141
viswa-uipath merged 2 commits into
mainfrom
feat/frameworks

Conversation

@viswa-uipath

@viswa-uipath viswa-uipath commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds two optional string fields to UiPathRuntimeFactorySettings so framework adapters can carry their own identity (agent type + framework name) through the factory-settings surface. Downstream consumers that need those labels — governance audit events, tracing spans, telemetry envelopes — can read them off settings instead of sniffing the filesystem for langgraph.json / llama_index.json / etc.

class UiPathRuntimeFactorySettings(BaseModel):
    trace_settings: UiPathTraceSettings | None = None
    agent_type: str | None = None       # new
    agent_framework: str | None = None  # new

Both fields default to None so every existing adapter and consumer keeps working unchanged. Adapters that want the labels populate them at registration time (e.g. agent_framework="langgraph") and the host reads them back through the factory registry lookup.

Scope

3 files changed, +6/-2

File Change
src/uipath/runtime/factory.py Two new str | None = None fields on UiPathRuntimeFactorySettings
pyproject.toml Version bump 0.11.60.11.7
uv.lock Lockfile refresh for the version bump

Backward compatibility

Additive only — both fields have a None default:

  • Existing adapters that don't set them continue to work with zero edits
  • Consumers that read settings.agent_type / settings.agent_framework must handle None
  • No API removals, no signature changes, no behavioral changes on the existing surface

Test plan

  • uv run pytest — full suite green locally
  • uv run ruff check . / uv run ruff format --check . — clean
  • uv run mypy --config-file pyproject.toml . — clean

Follow-ups (separate PRs, not in this one)

  • Framework adapters (uipath-langchain, uipath-llamaindex, uipath-openai-agents, etc.) will populate agent_framework on their factory registration in follow-up commits in their own repos
  • The host CLI's _governance_bootstrap.py can drop its filesystem-sniffing detect_agent_framework once at least one adapter ships the label; until then it keeps working as a fallback

Development Package

[project]
dependencies = [
  # Exact version:
  "uipath-runtime==0.11.7.dev1001410600",

  # Any version from this PR:
  "uipath-runtime>=0.11.7.dev1001410000,<0.11.7.dev1001420000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath-runtime = { index = "testpypi" }

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 2, 2026 04:24
@viswa-uipath viswa-uipath requested a review from a team as a code owner July 2, 2026 04:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a backwards-compatible way for consumers to retrieve both the resolved runtime factory and the framework name it was registered under, enabling telemetry/governance labeling without separate framework-detection logic.

Changes:

  • Introduces SelectedFactory and UiPathRuntimeFactoryRegistry.get_selection() to return (factory, framework) using the same resolution rules as get().
  • Keeps UiPathRuntimeFactoryRegistry.get() signature/return type unchanged by delegating to get_selection().factory.
  • Exports SelectedFactory, adds branch-coverage tests for get_selection, and bumps version to 0.11.7.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/uipath/runtime/registry.py Adds SelectedFactory and get_selection(), and refactors get() to delegate while preserving behavior.
src/uipath/runtime/__init__.py Re-exports SelectedFactory as part of the public runtime package API.
tests/test_registry.py Adds direct unit tests for get_selection() branches and confirms get() BC delegation.
pyproject.toml Bumps project version to 0.11.7.
uv.lock Updates lockfile entry for uipath-runtime to 0.11.7.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@viswa-uipath viswa-uipath force-pushed the feat/frameworks branch 2 times, most recently from 46b1c1b to 75a057c Compare July 2, 2026 10:51
CI's ``ruff format --check .`` flagged trailing whitespace on the
blank line between the ``agent_type`` and ``agent_framework`` fields.
Autoformat trim only — no behavioral change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

@viswa-uipath viswa-uipath changed the title feat(runtime): expose framework name via factory registry feat(runtime): add agent_type + agent_framework fields to UiPathRuntimeFactorySettings Jul 2, 2026
@viswa-uipath viswa-uipath merged commit eeb50a1 into main Jul 2, 2026
95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants